Skip to content

Conversation

wetmarble
Copy link

@wetmarble wetmarble commented Oct 17, 2023

Support for Dropbox-API-Path-Root header

This PR allows users to set the Dropbox-API-Path-Root header globally for the client instantiation. This allows the Dropbox object to be scoped to a team namespace instead of an individual user's namespace.

Information on Dropbox's use of namespaces can be found here: https://developers.dropbox.com/dbx-team-files-guide#namespaces

Solves issue #207

Changes

compser.json

  • Added phpunit support for versions 7 and 8
  • Added ext-json to facilitate creating a json to pass the header data

Dropbox.php

  • Added namespace_id to the config options
  • Set the namespace id of the http client

DropboxGuzzleHttpClient.php

  • Added a new protected property namespaceId of type string|null
  • Added a setNamespaceId() method which accepts string or null as it's input and sets the protected property
  • Updated send() to add a Dropbox-API-Path-Root header to the headers array if namespaceId is set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant